package api.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;

@TableMeta(name="ot_api_collect_join",description="汇总链接表")
public class ApiCollectJoin extends Model {

    @LinkTableMeta(name="api_collect_oid",table= ApiCollect.class,description="所属汇总表")
    private ApiCollect apiCollect;

    @FieldMeta(name="sort",type=FieldType.INT,description="排序")
    private Integer sort;
    @FieldMeta(name="join_type",type= FieldType.STRING,length=20,description="链接类型",dictOption = "left join:left join,join:join,right join:right join")
    private String joinType;
    @FieldMeta(name="source",type=FieldType.STRING,length=10,description="来源",dictOption = "table:数据模型,collect:汇总模型")
    private String source;
    @LinkTableMeta(name="table_oid",table= ApiTable.class,description="join表")
    private ApiTable table;
    @LinkTableMeta(name="collect_oid",table= ApiCollect.class,description="汇总表")
    private ApiCollect collect;
    @FieldMeta(name="alias",type= FieldType.STRING,length=20,description="表别名")
    private String alias;
    @FieldMeta(name="join_on",type= FieldType.STRING,length=50,description="链接条件")
    private String joinOn;

    public ApiCollect getApiCollect() {
        return apiCollect;
    }

    public void setApiCollect(ApiCollect apiCollect) {
        this.apiCollect = apiCollect;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getJoinOn() {
        return joinOn;
    }

    public void setJoinOn(String joinOn) {
        this.joinOn = joinOn;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public ApiCollect getCollect() {
        return collect;
    }

    public void setCollect(ApiCollect collect) {
        this.collect = collect;
    }

    public String getJoinType() {
        return joinType;
    }

    public void setJoinType(String joinType) {
        this.joinType = joinType;
    }

    public ApiTable getTable() {
        return table;
    }

    public void setTable(ApiTable table) {
        this.table = table;
    }
}
